package groep3.ssc.skaterViews.DirectionArrow;

import android.graphics.Path;

public abstract class Arrow
{
    protected Path path;
    protected float width;
    protected float heigth;

    protected float pointTop;
    protected float pointBottom;
    protected float pointCenter;
    protected float pointLeft;
    protected float pointRight;

    private Path rectPath;
    protected int rectLeftTopX;
    protected int rectLeftTopY;
    protected int rectRightTopX;
    protected int rectRightTopY;
    protected int rectRightBottomX;
    protected int rectRightBottomY;
    protected int rectLeftBottomX;
    protected int rectLeftBottomY;

    public Arrow(float width, float heigth)
    {
        this.width = width;
        this.heigth = heigth;
        this.path = new Path();
        this.rectPath = new Path();
    }

    protected void preparePath()
    {
        //start in point for arrow point
        path.moveTo(pointLeft, pointTop);// .  <--
        path.lineTo(pointRight, pointTop);//  / <--
        path.lineTo(pointLeft, pointBottom);// | <--
        path.lineTo(pointLeft, pointTop); // \  <--

        rectPath.moveTo(rectLeftTopX, rectLeftTopY);// .
        rectPath.lineTo(rectRightTopX, rectRightTopY);// --
        rectPath.lineTo(rectRightBottomX, rectRightBottomY);// |
        rectPath.lineTo(rectLeftBottomX, rectLeftBottomY);// _
        rectPath.lineTo(rectLeftTopX, rectLeftTopY);// |
    }

    /**
     * 
     * @return Path path
     */
    public Path getPath()
    {
        return path;
    }

    public Path getRect()
    {
        return rectPath;
    }
}